import {_decorator, Component, Node} from 'cc';
import {AudioManager} from "db://assets/AudioManager";
import {AudioPaths} from "db://assets/AudioPaths";

const {ccclass, property} = _decorator;

@ccclass('MainController')
export class MainController extends Component {
    start() {

    }

    update(deltaTime: number) {

    }

    public click() {
        AudioManager.getInstance().playSound(AudioPaths.clickSound, false);
    }

    public dragonDie() {
        AudioManager.getInstance().playSound(AudioPaths.dragonDieSound, false);
    }

    public fire() {
        AudioManager.getInstance().playSound(AudioPaths.fireSound, false);
    }

    public hitMonster() {
        AudioManager.getInstance().playSound(AudioPaths.hitMonsterSound, false);
    }

    public hitPlayer() {
        AudioManager.getInstance().playSound(AudioPaths.hitPlayerSound, false);
    }

    public revive() {
        AudioManager.getInstance().playSound(AudioPaths.reviveSound, false);
    }
}

